<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@page import="com.base.model.CompanyInfo"%>
    <%
    CompanyInfo companyInfo = new CompanyInfo();
    if(session.getAttribute("userName")==null){ 
    	response.sendRedirect(request.getContextPath()+"/pages/admin/login.jsp");
    }else{
    	companyInfo = (CompanyInfo)request.getAttribute("companyInfo");
    }
    %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>公司信息维护</title>
	<link href="<%=request.getContextPath() %>/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<style type="text/css"> 
<!--
body,td,th {
	font-size: 9pt;
}
.border-l-b-r-t {
	BORDER-RIGHT: #cecfce 1px solid; BORDER-TOP: #cecfce 1px solid; BORDER-LEFT: #cecfce 1px solid; BORDER-BOTTOM: #cecfce 1px solid
}
.main_table{
      font-size:12px;
}
.main_table input{
   border:1px FF9900 solid;
   background:#f9b88a;
 
 
}
 
.main_table textarea{
   border:1px FF9900 solid;
   background:#f9b88a;
}
-->
</style>
 
<!-- 添加留言 -->
<script language="javascript"> 
<!--
	function check()
	{
		if (form1.companyName.value=="")
		{
			alert("公司名不能为空！");
			form1.companyName.focus();
			return false;
		}
	 
		if (form1.companyTel.value=="")
		{
			alert("公司电话不能为空！");
			form1.companyTel.focus();
			return false;
		}
		
		if (form1.companyFax.value=="")
		{
			alert("公司传真不能为空！");
			form1.companyFax.focus();
			return false;
		}
	 
		if (form1.companyEmail.value=="")
		{
			alert("公司邮箱不能为空！");
			form1.companyEmail.focus();
			return false;
		}
		if (form1.companyAddres.value=="")
		{
			alert("公司地址不能为空！");
			form1.companyAddres.focus();
			return false;
		}
	 
		if (form1.companyPostcode.value=="")
		{
			alert("公司邮编不能为空！");
			form1.companyPostcode.focus();
			return false;
		}
		if (form1.companyDescription.value=="")
		{
			alert("公司描述不能为空！");
			form1.companyDescription.focus();
			return false;
		}
	 
		return true;
	}
	function update(){
		if(check()){
			document.form1.action = "CompanyServlet.do?method=update";
			document.form1.submit();
		}
	}
-->
</script>

<FORM name="form1" method="post" onSubmit="update()">
<INPUT type="hidden" name=companyId class=inputstyle id="companyId" value="<%=companyInfo.getCompanyId() %>">
<table width="100%" border="0" align="center"  cellspacing="0" class="main_table" background="<%=request.getContextPath() %>/images/foot_19.gif">
      <TR>
      <td height="42" colspan="2">&nbsp;</td>
      </TR>
      <TR>
        <TD noWrap align=right width="7%">公司名： </TD>
        <TD width="93%">
        <INPUT name=companyName class=inputstyle id="companyName" value="<%=companyInfo.getCompanyName() %>">
            <font color="#FF0000">*</font></TD>
      </TR>
      <TR>
        <TD noWrap align=right width="7%">公司电话： </TD>
        <TD width="93%"><INPUT type ="text"
                      name=companyTel class=inputstyle id="companyTel" value="<%=companyInfo.getCompanyTel() %>">
            <font color="#FF0000">*</font></TD>
      </TR>
       <TR>
        <TD noWrap align=right width="7%">公司传真： </TD>
        <TD width="93%"><INPUT type ="text"
                      name=companyFax class=inputstyle id="companyFax" value="<%=companyInfo.getCompanyFax() %>">
            <font color="#FF0000">*</font></TD>
      </TR>
      <TR>
        <TD noWrap align=right width="7%">公司邮箱： </TD>
        <TD width="93%"><INPUT type ="text"
                      name=companyEmail class=inputstyle id="companyEmail" value="<%=companyInfo.getCompanyEmail() %>">
            <font color="#FF0000">*</font></TD>
      </TR>
      <TR>
        <TD noWrap align=right width="7%">公司地址： </TD>
        <TD width="93%"><INPUT type ="text"
                      name=companyAddres class=inputstyle id="companyAddres" value="<%=companyInfo.getCompanyAddres() %>">
            <font color="#FF0000">*</font></TD>
      </TR>
      <TR>
        <TD noWrap align=right width="7%">公司邮编： </TD>
        <TD width="93%"><INPUT type ="text"
                      name=companyPostcode class=inputstyle id="companyPostcode" value="<%=companyInfo.getCompanyPostcode() %>">
            <font color="#FF0000">*</font></TD>
      </TR>
      <TR>
        <TD noWrap align=right width="7%">公司描述： </TD>
        <TD width="93%"><INPUT type ="text"
                      name=companyDescription class=inputstyle id="companyDescription" value="<%=companyInfo.getCompanyDescription() %>">
            <font color="#FF0000">*</font></TD>
      </TR>
      <TR>
        <TD noWrap align="center"></TD>
        <td><INPUT type=submit value="修改" name=Submit></TD>
</tr>
</table>
  </FORM>

</body>
</html>